Skip to content

Use weighted_vertex struct (descriptor + distance) in dijkstra_shorte…#13

Merged
pratzl merged 1 commit intomainfrom
dijkstra_qw
Mar 14, 2026
Merged

Use weighted_vertex struct (descriptor + distance) in dijkstra_shorte…#13
pratzl merged 1 commit intomainfrom
dijkstra_qw

Conversation

@pratzl
Copy link
Collaborator

@pratzl pratzl commented Mar 13, 2026

…st_paths queue

Replace the vertex_desc-based priority queue with a weighted_vertex struct that stores both a vertex descriptor and its current distance, mirroring the approach used in dijkstra_clrs. The comparator now compares stored weights directly instead of looking up distances[vertex_id(g, v)] on every comparison.

…st_paths queue

Replace the vertex_desc-based priority queue with a weighted_vertex struct
that stores both a vertex descriptor and its current distance, mirroring the
approach used in dijkstra_clrs. The comparator now compares stored weights
directly instead of looking up distances[vertex_id(g, v)] on every comparison.
@pratzl pratzl merged commit e2e0f11 into main Mar 14, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant